import { Controller, Get } from '@nestjs/common';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { ModuleSwaggerTags } from '~/constants/modules.constant';
import { WeatherService } from '~/modules/weather/weather.service';
import { Public } from '~/modules/auth/decorators/public.decorator';

@ApiTags(ModuleSwaggerTags.WEATHER)
@Controller('weather')
export class MiniappWeatherController {
	constructor(
		private readonly weatherService: WeatherService, // Assuming WeatherService is imported from the correct path
	) {}

	@Public()
	@Get('forecast')
	@ApiOperation({ summary: '获取当天和明天的天气信息' })
	@ApiResponse({ status: 200, description: '返回当天和明天的天气信息' })
	async getTodayAndTomorrowWeather() {
		return this.weatherService.getTodayAndTomorrowWeather();
	}
}
